package com.topnav.mc.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.topnav.mc.entity.base.BaseEntity;
import com.topnav.mc.validator.group.IAdd;
import com.topnav.mc.validator.group.IUpdate;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 说明：
 * @类名: RolePermission
 * <p>
 *  角色权限
 * </p>
 * @author   kenny
 * @Date	 2022年2月10日上午9:25:13
 */
@Data
@TableName("mc_role_permission")
public class RolePermission extends BaseEntity {

	/** */
	private static final long serialVersionUID = -281515884962437096L;

	@ApiModelProperty(name="角色id")
	@NotNull(message = "角色不允许为空",groups={IAdd.class, IUpdate.class})
    private Long roleId;

	@ApiModelProperty(name="权限id")
	@NotNull(message = "权限不允许为空",groups={IAdd.class, IUpdate.class})
	@TableField("pm_id")
    private Long permissionId;

	@TableField(exist=false)
	private Permission permission;

	@TableField(exist=false)
	private Role role;
}
